<?php
/**
 * CRM路由配置
 * 包含订单管理相关路由
 */
use think\facade\Route;

// 订单管理路由组
Route::group('order', function () {
    // 订单CRUD
    Route::post('create', 'crm.Order/create');
    Route::get('list', 'crm.Order/list');
    Route::get('detail/:id', 'crm.Order/detail');
    Route::put('update/:id', 'crm.Order/update');
    Route::delete('delete/:id', 'crm.Order/delete');
    
    // 订单类型
    Route::get('type/list', 'crm.OrderType/list');
    Route::get('type/category/:category', 'crm.OrderType/getByCategory');
    
    // 支付记录
    Route::post('payment/add', 'crm.OrderPayment/add');
    Route::get('payment/list', 'crm.OrderPayment/list');
    Route::post('payment/verify/:id', 'crm.OrderPayment/verify');
})->prefix('crm/')->middleware(['JwtAuth', 'DataPermission']);

// 注意：将此内容添加到 backend/route/crm.php 文件的相应位置
